<template>
  <div class="errPage-container">
    <!--<el-button @click="initServiceTicket" icon='arrow-left' class="pan-back-btn">返回</el-button>-->
  </div>
</template>

<script>
export default {
  name: '',
  data() {
    return {
    }
  },
  created() {
    this.initServiceTicket()
  },
  methods: {
    initServiceTicket() {
      const that = this
      let serviceTicket = ''
      if (window.location.href.split('?')[1]) {
        serviceTicket = window.location.href.split('?')[1].split('=')[1]
      }
      console.log(serviceTicket)
      if (serviceTicket) {
        that.$store.dispatch('LoginServiceTicket', serviceTicket).then(() => {
          // location.reload() // 为了重新实例化vue-router对象 避免bug
          this.$router.push({ path: '/' })
        })
      } else {
        this.$router.push({ path: '/' })
      }
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .errPage-container {
    width: 800px;
    margin: 100px auto;
    .pan-back-btn {
      background: #008489;
      color: #fff;
    }
    .pan-gif {
      margin: 0 auto;
      display: block;
    }
    .pan-img {
      display: block;
      margin: 0 auto;
      width: 100%;
    }
    .text-jumbo {
      font-size: 60px;
      font-weight: 700;
      color: #484848;
    }
    .list-unstyled {
      font-size: 14px;
      li {
        padding-bottom: 5px;
      }
      a {
        color: #008489;
        text-decoration: none;
        &:hover {
          text-decoration: underline;
        }
      }
    }
  }
</style>
